package com.example.shop.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.example.shop.pojo.User;
import com.example.shop.pojo.UserDepartment;

@Mapper
public interface UserDepartmentMapper {
	/**
	 *添加部员
	 */
	int add(UserDepartment userDepartment);

	/**
	 * 根据部门id删除部员
	 */
	int deleteByDepartmentId(Long deparetmntId);
	/**
	 * 查询同上司的部门id
	 */
	List<Long> selectIsUPA(String userParentAccount);
	/**
	 * 根据部门id查找
	 */
	List<UserDepartment> selectByDepartmentId(@Param("departmentId") Long departmentId);
	/**
	 * 更新部员
	 */
	int updateByAccount(UserDepartment userDepartment);
	/**
	 * 根据用户账号查询
	 */
	UserDepartment selectByUserAccount(UserDepartment userDepartment);
}
